# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=liblognorm
pkgver=2.0.6
pkgrel=5
pkgdesc="A fast log-normalization library"
url="https://www.liblognorm.com/"
arch="all"
license="LGPL-2.1-or-later AND Apache-2.0"
depends_dev="libestr-dev"
checkdepends="bash"
makedepends="$depends_dev libfastjson-dev"
subpackages="$pkgname-dev"
source="http://www.liblognorm.com/files/download/liblognorm-$pkgver.tar.gz
	parse-name-value-quoting-support.patch
	"

prepare() {
 	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-testbench
	make
}

check() {
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="0b4ee55eb54920dd096fdd6d6dcc2263bc52e74442d86503bfebf26b31492a8c1b67cb3b709ecc8b96cc53252151515719027306b2b6f7ba3404adc5a48cf125  liblognorm-2.0.6.tar.gz
0cebeda088e6e1c98aa370b7efbefde6d208540c7e02637940f87763535f8d6134a81a813640d7d4fa6f8ee0454e456ac9d133b4dced17f0ea8d0a3cb4c8542f  parse-name-value-quoting-support.patch"
